package com.roast.services.my;

import com.roast.domain.*;
import java.util.ArrayList;
import org.apache.tapestry5.ioc.annotations.InjectService;

public class MyServicesFacadeImpl implements MyServicesFacade {

    //User
    @InjectService("Singup")
    private Singup Singup;

    @InjectService("Login")
    private Login Login;

    @InjectService("Find")
    private Find Find;

    @InjectService("Edit")
    private Edit Edit;

    //Event
    @InjectService("Create")
    private Create Create;

    @InjectService("GetEvent")
    private GetEvent GetEvent;

    @InjectService("AddressToStar")
    private AddressToStar AddressToStar;

    @InjectService("CommentAddressing")
    private CommentAddressing CommentAddressing;

    @InjectService("GetAddress")
    private GetAddress GetAddress;

    //getEvents
    @InjectService("GetPublicEvents")
    private GetPublicEvents GetPublicEvents;

    @InjectService("GetUserEvents")
    private GetUserEvents GetUserEvents;

    @Override
    public int singup(UserData user) {
        return Singup.singup(user);
    }

    @Override
    public int login(UserData user) {
        return Login.login(user);
    }

    @Override
    public int find(UserData user) {
        return Find.find(user);
    }

    @Override
    public int edit(UserData user) {
        return Edit.edit(user);
    }

    @Override
    public int create(Event event) {
        return Create.create(event);
    }

    @Override
    public int getEvent(Event event) {
        return GetEvent.getEvent(event);
    }

    @Override
    public int addressToStar(Event event) {
        return AddressToStar.address(event);
    }

    @Override
    public int commentAddressing(Address address) {
        return CommentAddressing.comment(address);
    }

    @Override
    public int getAddress(Address address) {
        return GetAddress.getAddress(address);
    }

    @Override
    public int getPublicEvents(ArrayList<Event> list) {
        return GetPublicEvents.getEvents(list);
    }

    @Override
    public int getUserEvents(ArrayList<Event> list) {
        return GetUserEvents.getEvents(list);
    }
}
